package com.tpi.smartpayments;

/**
 * <p>Title: SmartPaymentsClient_JavaHTTPPost</p>
 *
 * <p>Description: A simple example to show how to use HTTP POST to send
 * transactions to the SmartPayments Web Service</p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: TPI Software</p>
 *
 * @author Andy Chau
 * @version 1.0
 */
public class Response {
    private int result = -1;
    private java.lang.String respMSG;
    private java.lang.String message;
    private java.lang.String message1;
    private java.lang.String message2;
    private java.lang.String authCode;
    private java.lang.String PNRef;
    private java.lang.String hostCode;
    private java.lang.String hostURL;
    private java.lang.String receiptURL;
    private java.lang.String getAVSResult;
    private java.lang.String getAVSResultTXT;
    private java.lang.String getStreetMatchTXT;
    private java.lang.String getZipMatchTXT;
    private java.lang.String getCVResult;
    private java.lang.String getCVResultTXT;
    private java.lang.String getGetOrigResult;
    private java.lang.String getCommercialCard;
    private java.lang.String workingKey;
    private java.lang.String keyPointer;
    private java.lang.String invNum;
    private java.lang.String cardType;
    private java.lang.String extData;
    private java.lang.String theResponseXmlStr;

    public Response() {
    }

    public Response(String responseXmlStr) {
        theResponseXmlStr = responseXmlStr;
        String resultStr = Util.retriveFromXMLTag(responseXmlStr, "Result");
        result = Integer.parseInt(resultStr);
        respMSG = Util.retriveFromXMLTag(responseXmlStr, "RespMSG");
        message = Util.retriveFromXMLTag(responseXmlStr, "Message");
        message1 = Util.retriveFromXMLTag(responseXmlStr, "Message1");
        message2 = Util.retriveFromXMLTag(responseXmlStr, "Message2");
        authCode = Util.retriveFromXMLTag(responseXmlStr, "AuthCode");
        PNRef = Util.retriveFromXMLTag(responseXmlStr, "PNRef");
        hostCode = Util.retriveFromXMLTag(responseXmlStr, "HostCode");
        hostURL = Util.retriveFromXMLTag(responseXmlStr, "HostURL");
        receiptURL = Util.retriveFromXMLTag(responseXmlStr, "ReceiptURL");
        getAVSResult = Util.retriveFromXMLTag(responseXmlStr, "GetAVSResult");
        getAVSResultTXT = Util.retriveFromXMLTag(responseXmlStr, "GetAVSResultTXT");
        getStreetMatchTXT = Util.retriveFromXMLTag(responseXmlStr, "GetStreetMatchTXT");
        getZipMatchTXT = Util.retriveFromXMLTag(responseXmlStr, "GetZipMatchTXT");
        getCVResult = Util.retriveFromXMLTag(responseXmlStr, "GetCVResult");
        getCVResultTXT = Util.retriveFromXMLTag(responseXmlStr, "GetCVResultTXT");
        getGetOrigResult = Util.retriveFromXMLTag(responseXmlStr, "GetGetOrigResult");
        getCommercialCard = Util.retriveFromXMLTag(responseXmlStr, "GetCommercialCard");
        workingKey = Util.retriveFromXMLTag(responseXmlStr, "WorkingKey");
        keyPointer = Util.retriveFromXMLTag(responseXmlStr, "KeyPointer");
        invNum = Util.retriveFromXMLTag(responseXmlStr, "InvNum");
        cardType = Util.retriveFromXMLTag(responseXmlStr, "CardType");
        extData = Util.retriveFromXMLTag(responseXmlStr, "ExtData");
    }

    public int getResult() {
        return result;
    }

    public void setResult(int result) {
      this.result = result;
    }

    public java.lang.String getRespMSG() {
        return respMSG;
    }

    public void setRespMSG(String respMSG) {
      this.respMSG = respMSG;
    }

    public java.lang.String getMessage() {
        return message;
    }

    public void setMessage(String message) {
      this.message = message;
    }

    public java.lang.String getMessage1() {
        return message1;
    }

    public java.lang.String getMessage2() {
        return message2;
    }

    public java.lang.String getAuthCode() {
        return authCode;
    }

    public void setAuthCode(String authCode) {
      this.authCode = authCode;
    }

    public java.lang.String getPNRef() {
        return PNRef;
    }

    public void setPNRef(String PNREf) {
        this.PNRef = PNRef;
    }

    public java.lang.String getHostCode() {
        return hostCode;
    }

    public java.lang.String getHostURL() {
        return hostURL;
    }

    public java.lang.String getReceiptURL() {
        return receiptURL;
    }

    public java.lang.String getGetAVSResult() {
        return getAVSResult;
    }

    public java.lang.String getGetAVSResultTXT() {
        return getAVSResultTXT;
    }

    public java.lang.String getGetStreetMatchTXT() {
        return getStreetMatchTXT;
    }

    public java.lang.String getGetZipMatchTXT() {
        return getZipMatchTXT;
    }

    public java.lang.String getGetCVResult() {
        return getCVResult;
    }

    public java.lang.String getGetCVResultTXT() {
        return getCVResultTXT;
    }

    public java.lang.String getGetGetOrigResult() {
        return getGetOrigResult;
    }

    public java.lang.String getGetCommercialCard() {
        return getCommercialCard;
    }

    public java.lang.String getWorkingKey() {
        return workingKey;
    }

    public java.lang.String getKeyPointer() {
        return keyPointer;
    }

    public java.lang.String getExtData() {
        return extData;
    }

    public java.lang.String getInvNum() {
        return invNum;
    }

    public java.lang.String getCardType() {
        return cardType;
    }

    public java.lang.String toString() {
        return theResponseXmlStr;
    }
}
